package com.webflux.router;

import com.webflux.handler.UserHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RequestPredicates;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;

@Configuration
public class UserRouter {


//    @Autowired
//    private UserHandler userHandler;
//
//    @Bean
//    public RouterFunction<?> routerFunction(){
//        return RouterFunctions.route(RequestPredicates.GET("/user/create"), userHandler::insert)
//                .andRoute(RequestPredicates.GET("/user/find"),userHandler::findById)
//                .andRoute(RequestPredicates.GET("/user/findAll"),userHandler::findAll);
//    }
}
